<?php defined('BASEPATH') OR exit('No direct script access allowed');
/**
 * Description: Wap端主控制器
 *
 * @author      Eden
 * @datetime    2016/11/24 21:41
 * @copyright   Beijing CmsTop Technology Co.,Ltd.
 */

class WAP_Controller extends CI_Controller
{

    public function __construct()
    {
        parent::__construct();
    }

    /**
     * 获取配置
     * @param $key
     * @param string $field
     * @return bool
     */
    protected function _getConfigByKey($key, $field = '*')
    {
        if (empty($key)) {
            return false;
        }

        $query = $this->db->select($field)
            ->from('setting')
            ->where(array('use' => 'mobile', 'key' => $key))
            ->get();
        return $query->row_array();
    }

}
